/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum IsfdMeshOp2BoStatusEnum {
    INITIAL(0, "初始化"),
    STRUCTURING(1, "结构化中"),
    STRUCTURE_SUCCESS(2, "结构化成功"),
    STRUCTURE_FAILURE(3, "结构化失败");

    private final Integer value;
    private final String desc;

    public static IsfdMeshOp2BoStatusEnum fromValue(Integer value) {
        if (value == null) {
            return null;
        }
        for (IsfdMeshOp2BoStatusEnum status : values()) {
            if (status.getValue().equals(value)) {
                return status;
            }
        }
        return null; // 或者抛异常 IllegalArgumentException
    }
}
